class_name Screen
extends Node

signal screen_transition_request(screen_type: SoccerGame.ScreenType, data: ScreenData)

@export var music: MusicPlayer.Music

var game: SoccerGame
var screen_data: ScreenData

func _enter_tree() -> void:
	MusicPlayer.play_music(music)

func setup(context_game: SoccerGame, context_data: ScreenData) -> void:
	game = context_game
	screen_data = context_data
	
func screen_transition(screen_type: SoccerGame.ScreenType, data: ScreenData = ScreenData.new()) -> void:
	screen_transition_request.emit(screen_type, data)
